/**
 * <p>Copyright (c) 2017 深圳市鹏途交通科技有限公司 				</p>
 * <p>		    All right reserved. 		     		</p>
 * <p>项目名称 ：深圳公路信息资源整合及国省检日常化监管管理        				</p>
 * <p>创建者 ：詹春贤 										</p>
 * <p>描   述  ：路政管理 - 路产保护 - 路政档案管理 						</p>
 * <p>最后修改 ：$: 2017年9月11日-上午9:58:55 v 1.0.0	 Administrator   $   </p>
 * 
*/

package com.pengtu.gsj.entity.lzgl;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;

/**
 * 
 * RoadFileMan
 * 
 * 2017年9月11日 上午9:46:55
 * 
 * @version 1.0.0
 * 
 */
@Entity
@Table(name = "T_LZ_ROADFILEMAN")
public class RoadFileMan extends IdEntity{

	/**
	 * serialVersionUID:TODO
	 *
	 * @since 1.0.0
	 */
	
	private static final long serialVersionUID = -9170343119903679898L;

	private String orgName;					//单位名称
	
	private String year;					//年份
	
	private String ifFileCom; 				//档案是否齐全
	
	private String ifRegSpeci; 				//登记是否规范
	
	private String ifSaveTlimit; 			//是否满足保存期限
	
	private String ifSpeciMan; 				//是否专人管理
	
	private String remark; 					// 备注
	
	private Integer bulletinNumber;   		//检测文件数
	
	private List<Attachment> attachments;   //加载附件

	
	public RoadFileMan() {
	}


	@Column(name = "ORGNAME")
	public String getOrgName() {
		return orgName;
	}

	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}


	@Column(name = "YEAR")
	public String getYear() {
		return year;
	}

	public void setYear(String year) {
		this.year = year;
	}


	@Column(name = "IFFILECOM")
	public String getIfFileCom() {
		return ifFileCom;
	}

	public void setIfFileCom(String ifFileCom) {
		this.ifFileCom = ifFileCom;
	}


	@Column(name = "IFREGSPECI")
	public String getIfRegSpeci() {
		return ifRegSpeci;
	}

	public void setIfRegSpeci(String ifRegSpeci) {
		this.ifRegSpeci = ifRegSpeci;
	}


	@Column(name = "IFSAVETLIMIT")
	public String getIfSaveTlimit() {
		return ifSaveTlimit;
	}

	public void setIfSaveTlimit(String ifSaveTlimit) {
		this.ifSaveTlimit = ifSaveTlimit;
	}


	@Column(name = "IFSPECIMAN")
	public String getIfSpeciMan() {
		return ifSpeciMan;
	}

	public void setIfSpeciMan(String ifSpeciMan) {
		this.ifSpeciMan = ifSpeciMan;
	}


	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}


	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}
}
